<template>
    <span @click="enterUserBus" :class="className" class="user-card-btn user-bus-detail">
        名片
    </span>
</template>

<script>
// 自定义方法
import { enterUserBus } from '_projectFn/page'
import { getCookie } from '_commonFn/cookie.js'

export default {
    name: 'UserCardBtn',
    props: {
        fine: {
            default: 0
        },
        userId: {
            default: ''
        }
    },
    data() {
        return {
            className: this.fine ? 'stick' : ''
        }
    },
    methods: {
        enterUserBus() {
            if (this.userId) {
                enterUserBus({
                    type: 'userIndex',
                    userId: this.userId,
                    checkLogin: false,
                })
            }
        }
    },
}
</script>

<style lang="scss" scoped>
.user-bus-detail {
    flex-shrink: 0;
    width: 48px;
    color: white;
    background: #00c702;
    display: -webkit-flex;
    display: flex;
    height: 25px;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.stick {
    background: #FF7D1A;
}
</style>